<?php

	namespace app\common\listener;

	use app\common\model\TraceLog as TraceLogModel;
	use app\event\ucenter\Visit as VisitEvent;
	use think\facade\Config;
	use think\facade\Log;
	use think\Response;

	class HttpEnd
	{
		public function handle(Response $response)
		{
//			$header = [
//				'X-Powered-By' => 'YiCmf/' . Config::get('setting.name').'-'. Config::get('setting.version'),
//                'Access-Control-Allow-Headers'=>' Origin, X-Requested-With, Content-Type, Accept, Authorization'
////				'Version' => Config::get('setting.name').'/' . Config::get('setting.version')
//			];
//			$response->header($header);
			$request = app('request');
//			$this->_visit($request);
		}

		protected function _visit($request)
		{
			if ('cli' != PHP_SAPI) {
				$visit = new VisitEvent();
				$visit->add();
			}
		}

	}